import http from "../utils/http/service";

// 查询施工质量检查列表
export const qtyCheckList = (data): any => {
  return http.post(`/snow-admin/qtyCheck/qtyCheckList`, data);
};

// 查询施工质量检查详情
export const checkInfo = (data): any => {
  return http.get(`/snow-admin/qtyCheck/info/${data.id}`);
};

// 查询检查项列表
export const checkItemList = (data): any => {
  return http.post(`/snow-admin/monQty/checkItem/checkItemList`, data);
};
// 新增检查项列表
export const checkItemListAdd = (data): any => {
  return http.post(`/snow-admin/monQty/checkItem/add`, data);
};
// 批量删除检查项列表
export const checkItemListDeleteBatch = (data): any => {
  return http.post(`/snow-admin/monQty/checkItem/deleteBatch`, data);
};
// 查询检查记录列表
export const checkRecordList = (data): any => {
  return http.post(`/snow-admin/monQty/checkRecord/checkRecordList`, data);
};

// 新增检查记录
export const addCheckRecord = (data): any => {
  return http.post(`/snow-admin/monQty/checkRecord/add`, data);
};

// 发起流程
export const flowStart = (data): any => {
  return http.post(`/snow-admin/monQty/checkRecord/flowStart`, data);
};

// 审批流程
export const flowSubmit = (data): any => {
  return http.post(`/snow-admin/monQty/checkRecord/flowSubmit`, data);
};

// 审批驳回
export const flowReject = (data): any => {
  return http.post(`/snow-admin/monQty/checkRecord/flowReject`, data);
};

// 查询检查记录详情
export const checkRecordInfo = (data): any => {
  return http.get(`/snow-admin/monQty/checkRecord/info/${data.id}`);
};

// 查询材料验收列表
export const materialList = (data): any => {
  return http.post(`/snow-admin/monMat/material/materialList`, data);
};

// 查询材料验详情
export const materialInfo = (data): any => {
  return http.get(`/snow-admin/monMat/material/info/${data.id}`);
};
// 查询检查项列表
export const materialCheckItemList = (data): any => {
  return http.post(`/snow-admin/monMat/materialItem/itemList`, data);
};
// 新增检查项列表
export const materialCheckItemListAdd = (data): any => {
  return http.post(`/snow-admin/monMat/materialItem/add`, data);
};
// 批量删除检查项列表
export const materialCheckItemListDeleteBatch = (data): any => {
  return http.post(`/snow-admin/monMat/materialItem/deleteBatch`, data);
};
// 查询材料验收的验收项列表
export const materialItemList = (data): any => {
  return http.post(`/snow-admin/monMat/materialItem/itemList`, data);
};

//启动材料验收
export const materialBatchStart = (data): any => {
  return http.post(`/snow-admin/monMat/record/batchStart`, data);
};

// 查询材料验收项记录列表
export const materialRecordList = (data): any => {
  return http.post(`/snow-admin/monMat/record/recordList`, data);
};

// 新增材料验收记录
export const addMaterialRecord = (data): any => {
  return http.post(`/snow-admin/monMat/record/add`, data);
};

// 查询材料验收记录详情
export const materialRecordInfo = (data): any => {
  return http.get(`/snow-admin/monMat/record/info/${data.id}`);
};

// 材料验收审批流程
export const materialFlowSubmit = (data): any => {
  return http.post(`/snow-admin/monMat/record/flowSubmit`, data);
};

// 审批驳回
export const materialFlowReject = (data): any => {
  return http.post(`/snow-admin/monMat/record/flowReject`, data);
};

// 更新材料验收的验收项发起记
export const materialUpdate = (data): any => {
  return http.post(`/snow-admin/monMat/record/update`, data);
};

// 材料验收审批流程
export const materialFlowInfo = (data): any => {
  return http.get(`/snow-admin/monMat/record/flowInfo/${data.id}`);
};

// 施工质量检查验收审批流程
export const qtyFlowInfo = (data): any => {
  return http.get(`/snow-admin/monQty/checkRecord/flowInfo/${data.id}`);
};

// 隐蔽验收相关接口 -----------------------------------------
// 查询隐蔽验收列表
// 查询检查项列表
export const concealCheckItemList = (data): any => {
  return http.post(`/snow-admin/monCon/concealItem/itemList`, data);
};
// 新增检查项列表
export const concealCheckItemListAdd = (data): any => {
  return http.post(`/snow-admin/monCon/concealItem/add`, data);
};
// 批量删除检查项列表
export const concealCheckItemListDeleteBatch = (data): any => {
  return http.post(`/snow-admin/monCon/concealItem/deleteBatch`, data);
};
export const concealList = (data): any => {
  return http.post(`/snow-admin/monCon/conceal/concealList`, data);
};

// 查询该条隐蔽验收详情
export const concealInfo = (data): any => {
  return http.get(`/snow-admin/monCon/conceal/info/${data.id}`);
};

// 隐蔽验收项列表
export const concealItemList = (data): any => {
  return http.post(`/snow-admin/monCon/concealItem/itemList`, data);
};

// 单个、批量启动隐蔽验收
export const concealBatchStart = (data): any => {
  return http.post(`/snow-admin/monCon/record/batchStart`, data);
};

// 查询隐蔽验收项记录列表
export const concealRecordList = (data): any => {
  return http.post(`/snow-admin/monCon/record/recordList`, data);
};

// 隐蔽验收审批流程信息
export const concealFlowInfo = (data): any => {
  return http.get(`/snow-admin/monCon/record/flowInfo/${data.id}`);
};
// 查询隐蔽验收记录详情
// export const concealRecordInfo = (data): any => {
//   return http.get(`/snow-admin/monCon/record/info/${data.id}`);
// };

// 隐蔽验收审批流程
export const concealFlowSubmit = (data): any => {
  return http.post(`/snow-admin/monCon/record/flowSubmit`, data);
};

// 更新隐蔽验收的验收项发起记
export const concealUpdate = (data): any => {
  return http.post(`/snow-admin/monCon/record/update`, data);
};

// 审批驳回
export const concealFlowReject = (data): any => {
  return http.post(`/snow-admin/monCon/record/flowReject`, data);
};

// 施工试验&见证检测相关接口 -----------------------------------------
// 查询施工试验&见证检测列表
export const witnessList = (data): any => {
  return http.post(`/snow-admin/monWit/witness/witnessList`, data);
};

// 查询该条施工试验&见证检测详情
export const witnessInfo = (data): any => {
  return http.get(`/snow-admin/monWit/witness/info/${data.id}`);
};
// 查询检查项列表
export const witnessCheckItemList = (data): any => {
  return http.post(`/snow-admin/monWit/witnessItem/itemList`, data);
};
// 新增检查项列表
export const witnessCheckItemListAdd = (data): any => {
  return http.post(`/snow-admin/monWit/witnessItem/add`, data);
};
// 批量删除检查项列表
export const witnessCheckItemListDeleteBatch = (data): any => {
  return http.post(`/snow-admin/monWit/witnessItem/deleteBatch`, data);
};
// 施工试验&见证检测项列表
export const witnessItemList = (data): any => {
  return http.post(`/snow-admin/monWit/witnessItem/itemList`, data);
};

// 单个、批量启动施工试验&见证检测验收
export const witnessBatchStart = (data): any => {
  return http.post(`/snow-admin/monWit/record/batchStart`, data);
};

// 查询施工试验&见证检测项记录列表
export const witnessRecordList = (data): any => {
  return http.post(`/snow-admin/monWit/record/recordList`, data);
};

// 施工试验&见证检测审批流程信息
export const witnessFlowInfo = (data): any => {
  return http.get(`/snow-admin/monWit/record/flowInfo/${data.id}`);
};
// 查询施工试验&见证检测记录详情
// export const witnessRecordInfo = (data): any => {
//   return http.get(`/snow-admin/monWit/record/info/${data.id}`);
// };

// 施工试验&见证检测审批流程
export const witnessFlowSubmit = (data): any => {
  return http.post(`/snow-admin/monWit/record/flowSubmit`, data);
};

// 更新施工试验&见证检测的验收项发起记录
export const witnessUpdate = (data): any => {
  return http.post(`/snow-admin/monWit/record/update`, data);
};

// 施工试验&见证检测审批驳回
export const witnessFlowReject = (data): any => {
  return http.post(`/snow-admin/monWit/record/flowReject`, data);
};

// 其他问题（随手拍）相关接口 -----------------------------------------
// 查询随手拍发起记录列表
export const snapRecordList = (data): any => {
  return http.post(`/snow-admin/monSnap/record/recordList`, data);
};

// 更新随手拍发起记录
export const snapUpdate = (data): any => {
  return http.post(`/snow-admin/monSnap/record/update`, data);
};

// 查询详情
export const monSnapRecordInfo = (data): any => {
  return http.get(`/snow-admin/monSnap/record/info/${data.id}`);
};

// 随手拍审批流程 提交
export const snapFlowSubmit = (data): any => {
  return http.post(`/snow-admin/monSnap/record/flowSubmit`, data);
};

// 随手拍审批流程 驳回
export const snapFlowReject = (data): any => {
  return http.post(`/snow-admin/monSnap/record/flowReject`, data);
};

// 查询随手拍审批流程信息
export const snapFlowInfo = (data): any => {
  return http.get(`/snow-admin/monSnap/record/flowInfo/${data.id}`);
};

// 单个、批量启动
export const snapBatchStart = (data): any => {
  return http.post(`/snow-admin/monSnap/record/batchStart`, data);
};

// 安全文明 相关接口 -----------------------------------------
// 安全文明列表数据
export const civilizlList = (data): any => {
  return http.post(`/snow-admin/monCon/civiliz/civilizList`, data);
};

// 查询详情
export const civilizInfo = (data): any => {
  return http.get(`/snow-admin/monCon/civiliz/info/${data.id}`);
};
// 查询检查项列表
export const civilizCheckItemList = (data): any => {
  return http.post(`/snow-admin/monCon/civilizItem/itemList`, data);
};
// 新增检查项列表
export const civilizCheckItemListAdd = (data): any => {
  return http.post(`/snow-admin/monCon/civilizItem/add`, data);
};
// 批量删除检查项列表
export const civilizCheckItemListDeleteBatch = (data): any => {
  return http.post(`/snow-admin/monCon/civilizItem/deleteBatch`, data);
};
// 查询安全文明验收的验收项列表
export const civilizItemList = (data): any => {
  return http.post(`/snow-admin/monCon/civilizItem/itemList`, data);
};

// 单个启动，批量启动接口
export const civilizBatchStart = (data): any => {
  return http.post(`/snow-admin/civiliz/record/batchStart`, data);
};

// 查询安全文明验收的验收项发起记录列表
export const civilizRecordList = (data): any => {
  return http.post(`/snow-admin/civiliz/record/recordList`, data);
};

// 查询安全文明验收的验收项审批流程信息
export const civilizFlowInfo = (data): any => {
  return http.get(`/snow-admin/civiliz/record/flowInfo/${data.id}`);
};
// 查询详情
export const civilizRecordInfo = (data): any => {
  return http.get(`/snow-admin/monCon/civiliz/info/${data.id}`);
};

// 安全文明验收的验收项审批流程 提交
export const civilizFlowSubmit = (data): any => {
  return http.post(`/snow-admin/civiliz/record/flowSubmit`, data);
};

// 更新安全文明验收的验收项发起记录
export const civilizUpdate = (data): any => {
  return http.post(`/snow-admin/civiliz/record/update`, data);
};

// 安全文明验收的验收项审批流程 驳回
export const civilizFlowReject = (data): any => {
  return http.post(`/snow-admin/civiliz/record/flowReject`, data);
};

// 查询当前流程是否可以撤回
export const queryCanRecall = (data): any => {
  return http.post(`/snow-admin/flow/common/canRecall`, data);
};

// 获取当前任务节点ID
export const getInstanceId = (data): any => {
  return http.post(`/snow-admin/flow/common/getTaskId`, data);
};

//查询雪花三期B类设备任务事项重复启动的流程列表
export const getDetailList = (data): any => {
  return http.post(`/snow-admin/thdFlowForm/taskFlowList`, data);
};

//流程启动撤回（任务事项启动~未真正发起流程可撤回）
export const recallProcessFlow = (data): any => {
  return http.post(`/snow-admin/thdFlowForm/task/recall`, data);
};

//开工通知审批
export const startWorkFlowSubmit = (data): any => {
  return http.post(`/snow-admin/proSec/startWork/flowSubmit`, data);
};
//开工通知驳回
export const startWorkFlowReject = (data): any => {
  return http.post(`/snow-admin/proSec/startWork/flowReject`, data);
};
